package cn.stylefeng.guns.modular.transport.service;

import cn.stylefeng.guns.base.pojo.page.LayuiPageInfo;
import cn.stylefeng.guns.modular.transport.entity.Hxchengyunshanganalysis;
import cn.stylefeng.guns.modular.transport.entity.TDispatch;
import cn.stylefeng.guns.modular.transport.model.params.TDispatchParam;
import cn.stylefeng.guns.modular.transport.model.result.SjCntVo;
import cn.stylefeng.guns.modular.transport.model.result.TDispatchResult;
import cn.stylefeng.guns.sys.modular.system.entity.User;
import cn.stylefeng.roses.core.reqres.response.ResponseData;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

/**
 * 调度单表 服务类
 */
public interface TDispatchService extends IService<TDispatch> {

    /**
     * 新增
     */
    void add(TDispatchParam param);

    /**
     * 删除
     */
    void delete(TDispatchParam param);

    /**
     * 更新
     */
    void update(TDispatchParam param);

    /**
     * 查询单条数据，Specification模式
     */
    TDispatchResult findBySpec(TDispatchParam param,Long operateId);

	/**
	 * 根据货运订单号，获取运输的信息
	 * @param dispatchNumber
	 * @return
	 */
	TDispatchResult findByDispatchNumber(String dispatchNumber);

    /**
     * 查询列表，Specification模式
     */
    List<TDispatchResult> findListBySpec(TDispatchParam param);

    /**
     * 查询分页数据，Specification模式
     */
     LayuiPageInfo findPageBySpec(TDispatchParam param,String condition,String driver1,Long operateId);

     /**
      * 查询分页数据，Specification模式
      */
      LayuiPageInfo findPageBySpecPaymentSettlement(TDispatchParam param,String condition,String driver1,Long operateId);

      /**
       * 查询分页数据，Specification模式
       */
       LayuiPageInfo findPageBySpecPaymentConfirm(TDispatchParam param,String condition,String driver1,Long operateId);

	TDispatch findByThelastone();
	
	void checkComplete(String dispatchNumber);

	Integer sumDayFaYunCarCount(TDispatchParam tDispatchParam);

	Integer sumMonthFaYunCarCount(TDispatchParam tDispatchParam);

	List<TDispatchResult> findchengyunshangcount(TDispatchParam tDispatchParam, String condition, String driver1,Long operateId);

	Integer countCarnumber(TDispatchParam param,Long operateId);

	TDispatchResult findBySpecAndCar(TDispatchParam param);

	List<SjCntVo> getSJCnt();

	TDispatchResult findByYunshuCar(TDispatchParam param,Long operateId);

	LayuiPageInfo findexaminePageBySpec(TDispatchParam tDispatchParam, String condition, String driver1,Long operateId);

	TDispatchResult findsumMonthFaYunCarCount(TDispatchParam tDispatchParam,Long operateId);

	TDispatchResult sumfulllvBySpec(TDispatchParam tDispatchParam);

	List<TDispatchResult> findHxtaizhang(TDispatchParam tDispatchParam, String condition, Long operateId);

	List<TDispatchResult> findHxzhaungzaicount(TDispatchParam tDispatchParam, String condition, Long operateId);

	List<Hxchengyunshanganalysis> findHxchengyunshanganalysis(TDispatchParam tDispatchParam, String condition, Long operateId);

	Integer countcheci(TDispatchParam countcheci);

	List<TDispatchResult> findHxfayuncheci(TDispatchParam tDispatchParam, String condition, Long operateId);

	List<TDispatchResult> findshifouyipeizhiByspec(TDispatchParam tDispatchParam, Long operateId);

	List<TDispatchResult> findHxzhuangchejindu(TDispatchParam tDispatchParam, String condition, Long operateId);

	void update2(TDispatchParam tDispatchParam);

	ResponseData update5(TDispatchParam tDispatchParam);

	ResponseData getExceldata(MultipartFile file, Long operateId, User user, HttpServletResponse response) throws IOException;

}
